package com.tourism.service.impl;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tourism.dao.UserInfoDao;
import com.tourism.model.UserInfo;
import com.tourism.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserInfoDao userInfoDao;
	
	@Override
	public UserInfo getUserInfoForLogin(String name)
			throws SQLException {
		
		return userInfoDao.selectUserForLogin(name);
	}

	@Override
	public void register(String userID, String password,String phoneNumber) throws SQLException {
		
		userInfoDao.insertUser(userID, password,phoneNumber);
	}

}
